Don't special case root package for overrides
authorAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 22 Aug 2016 12:07:18 +0000 (15:07 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 22 Aug 2016 12:07:18 +0000 (15:07 +0300)
src/cargo/ops/cargo_compile.rs

index 3ea700f49afd646d839231fafb0df9c264d95d51..2b58a0311db0c3d7304cf7300a36aa3e8f6dd161 100644 (file)
@@ -388,17 +388,12 @@ fn add_overrides<'a>(registry: &mut PackageRegistry<'a>,
         Some(list) => list,
         None => return Ok(())
     };
-    let current = try!(ws.current());
 
     let paths = paths.val.iter().map(|&(ref s, ref p)| {
         // The path listed next to the string is the config file in which the
         // key was located, so we want to pop off the `.cargo/config` component
         // to get the directory containing the `.cargo` folder.
         (p.parent().unwrap().parent().unwrap().join(s), p)
-    }).filter(|&(ref p, _)| {
-        // Make sure we don't override the local package, even if it's in the
-        // list of override paths.
-        current.root() != &**p
     });
 
     for (path, definition) in paths {